﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Happy.ExtentionMethods;

namespace Happy.Query.Filters
{
    /// <summary>
    /// 筛选器参数。
    /// </summary>
    public sealed class Parameter
    {
        /// <summary>
        /// 构造方法。
        /// </summary>
        public Parameter(string name, Boolean required = false)
        {
            name.MustNotNullAndNotWhiteSpace("name");

            this.Name = name;
            this.Required = required;
        }

        /// <summary>
        /// 参数名字。
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// 是否必填。
        /// </summary>
        public Boolean Required { get; private set; }
    }
}
